<template>
    <div class="goodsdesc">
        <h3>{{descinfo.title}}</h3>
        <hr />
        <div v-html="descinfo.content"></div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            id: this.$route.params.id,
            descinfo: []
        }
    },
    methods: {
        getDescInfo(e){
            this.$http.get('api/goods/getdesc/' + e).then(res => {
                this.descinfo = res.body.message[0];
                console.log(this.descinfo);
            })
        }
    },
    created() {
        this.getDescInfo(this.id);
    },
}
</script>

<style lang="less">
    .goodsdesc{
        padding: 10px;
        h3{
            font-size: 15px;
            line-height: 20px;
            text-align: center;
        }
        img{
            width: 100%;
            height: auto;
        }
    }
</style>